#ifndef QTROTATETOEFFECT_H
#define QTROTATETOEFFECT_H

#include "QtSingleAnimationEffect.h"
#include <QPointF>

class QtRotateToEffect: public QtSingleAnimationEffect
{
public:
	QtRotateToEffect();
	QtRotateToEffect(const QtRotateToEffect& rhs);
	virtual ~QtRotateToEffect();

	void SetTarget(QtSprite *sprite);
	QtSprite* Target() const;

	void SetEndAngle(qreal angle);
	QtAnimationEffect* Clone() const;

protected:
	void SetupAnimation();

private slots:
	void Update(qreal value);

private:
	qreal endAngle;
	qreal startAngle;
	QtSprite *target;
};

#endif //QTROTATETOEFFECT_H
